rem @echo off
echo GENY - Genious Build handler

if "%1" == "" goto :syntax
if "%1" == "add" goto :add
if "%1" == "delete" goto :delete
goto :syntax

:syntax
    echo geny add ^| delete
    echo     add ...^|{filename}
    echo     delete {filename}
    goto :eof
    
:add
    call :validateadd %2 %3 %4 %5 %6 %7 %8 %9
    for /f %%i in ('%param%') do @echo %%i
    set param=
    goto :eof
    
:validateadd
    if "%1" == "" goto :eof
    if "%1" == "..." if not "%param%" == "" (
        set param=
        goto :syntax
    )
    set param=%param%%1 
    shift
    goto :validateadd

:delete
    if "%1" == "" goto :syntax
    cpc delete %1
    goto :eof